import * as echarts from 'echarts';
// 部门总费用
const containsImg = (data) => {
  const option = {
    tooltip: {
    trigger: 'item'
  },
  grid: {
    left: "20%",
  },
  color: data.dataColor,
  graphic: {//图形中间图片
    elements: [{
      type: "image",
      style: {
        image: data.dataImg,//你的图片地址
        width: 50,
        height: 50,
      },
      left: "center",
      top: "center",
    }],
  },
  series: [
    {
      color: data.dataColor,
      type: "pie",
      radius: ["30", "33"],
      itemStyle: {
        borderRadius: 5,
      },
      label: {
        show:false,
      },
      data: data.dataCost,
    },
    {
      type: "pie",
      radius: ["27", "28"],
      data: [100],
      silent:'ture',
      label: {
        show: false,
      },
    },
  ],
};

const opt = Object.assign({},option);
return opt;
}

export default {
  containsImg
}
